@use './variables' as *;
@use './fonts';

// Reset CSS
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, $font-family;
  background-color: $bg-color;
  color: $text-color;
  font-size: $font-size-base;
  line-height: 1.5;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: max(12px, 1rem);
}
#my-screen-app {
  width: 100%;
  height: 100%;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: $primary-color;
  border-radius: 3px;
}

// 文字选中样式
::selection {
  background: $primary-color;
  color: $text-color;
}

// 数字字体
.number {
  font-family: DIN, "微软雅黑", "宋体", "新宋体", sans-serif;
}

// 文本溢出省略
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 卡片通用样式
.card {
  background-color: $bg-panel;
  border-radius: $border-radius;
  padding: $padding-sm;
}

// 标题通用样式
.card-title {
  font-size: $font-size-xl;
  font-weight: bold;
  margin-bottom: $padding-sm;
  color: $text-color;
}

// 渐变边框
.gradient-border {
  position: relative;
  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    border-radius: $border-radius;
    background-image: linear-gradient(to right, $primary-color, $secondary-color);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    pointer-events: none;
  }
}